package com.rybbaby.tss.front.tssMemberReturnPremium.service.imp;

import com.rybbaby.tss.core.web.service.imp.BaseServiceImp;
import com.rybbaby.tss.front.tssMemberReturnPremium.dao.ITssMemberReturnPremiumDao;
import com.rybbaby.tss.front.tssMemberReturnPremium.entity.TssMemberReturnPremium;
import com.rybbaby.tss.front.tssMemberReturnPremium.service.ITssMemberReturnPremiumService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @description 会员退费记录表数据库操作服务实现
 * 
 * @author 雷春琼
 * 
 * @createDate 2017-08-10 上午12:14:02
 */
@Service
@Transactional
public class TssMemberReturnPremiumServiceImp extends BaseServiceImp<TssMemberReturnPremium> implements ITssMemberReturnPremiumService {

    @Autowired
    private ITssMemberReturnPremiumDao tssMemberReturnPremiumDao;

    @Override
    public TssMemberReturnPremium findSumAmout(String stuId, int i) throws Exception{
        List<TssMemberReturnPremium> TssMemberReturnPremiumList = tssMemberReturnPremiumDao.findSumAmout(stuId, i);
        return TssMemberReturnPremiumList.get(0);
    }

    @Override
    public Map<String, Object> findTodayRefund(String adminUserIds) {
        return tssMemberReturnPremiumDao.findTodayRefund(adminUserIds);
    }

    @Override
    public Map<String, Object> findMonthRefund(String adminUserIds) {
        return tssMemberReturnPremiumDao.findMonthRefund(adminUserIds);
    }

    @Override
    public List<Map<String , Object>> packageRefundList(String memberId) {
        return tssMemberReturnPremiumDao.packageRefundList(memberId);
    }

    @Override
    public List<Map<String , Object>> depositRefundList(String memberId) {
        return tssMemberReturnPremiumDao.depositRefundList(memberId);
    }

    @Override
    public List<Map<String , Object>> paymentRefundList(String memberId) {
        return tssMemberReturnPremiumDao.paymentRefundList(memberId);
    }

    @Override
    public List<Map<String , Object>> registeryFeeRefundList(String memberId) {
        return tssMemberReturnPremiumDao.registeryFeeRefundList(memberId);
    }
}
